<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>PHP Data Types</title>
</head>
<body>
<h1>PHP 5 Data Types</h1>
<div>
    <h3>PHP Strings</h3>
    <?php
    $x = "Hello world!";
    echo($x);
    echo("<br/>");
    $x = 'Hello world!';
    echo($x);
    ?>
</div>
<div>
    <h3>PHP Integer</h3>
    <?php
    $x = 5985;
    var_dump($x);
    echo("<br>");
    $x = -345;// negative number
    var_dump($x);
    echo("<br>");
    $x = 0x8C; //  hexadecimal number
    var_dump($x);
    echo("<br>");
    $x = 047;// octal number
    var_dump($x);
    ?>
</div>
<div>
    <h3>PHP Floating Point Numbers</h3>
    <?php
    $x = 10.365;
    var_dump($x);
    echo("<br>");
    $x = 2.4e3;
    var_dump($x);
    echo("<br>");
    $x = 8E-5;
    var_dump($x);
    ?>
</div>
<div>
    <h3>PHP Booleans</h3>
    <?php
    $x = true;
    var_dump($x);
    echo($x);
    $y = false;
    var_dump($y);
    echo($y);
    ?>
</div>
<div>
    <h3>PHP Arrays</h3>
    <?php
    $cars = array("Volvo","BMW","Toyota",1);
    var_dump($cars);
    ?>
</div>
<div>
    <h3>PHP Objects</h3>
    <?php
    class Car{
        var $color;
        function Car($color = "green"){
            $this->color = $color;
        }
        function what_color(){
            return $this->color;
        }
    }
    $carDefault = new Car();
    $carRed = new Car("Red");
    echo("CarDefault : ".$carDefault->what_color());
    var_dump($carDefault);
    echo("CarRed : ".$carRed->what_color());
    var_dump($carRed);
    ?>
</div>
<div>
    <h3>PHP NULL Value</h3>
    <?php
    $x = "Hello world";
    $x = null;
    var_dump($x);
    ?>
</div>
</body>
</html>